package com.plian.system.entity.sys;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.plian.Tools.DateUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @Description: TODO
 * @Author: Take-off
 * @Date: 2023/6/8 9:48 AM
 * @Param
 * @return
 * @Version: 1.0
 **/
@Data
@TableName("sys_behavioral_data")
@ApiModel(value = "BehavioralData 对象", description = "用户行为数据")
public class BehavioralData implements Serializable {
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键id")
    private Long id;

    @ApiModelProperty(value = "用户标识")
    private String userId;

    @ApiModelProperty(value = "用户组织id")
    private String orgId;

    @ApiModelProperty(value = "用户类型:管理员-0;国资-1；领导-2；企业-3；")
    private String userRole;

    @ApiModelProperty(value = "菜单类型")
    private String formType;

    @ApiModelProperty(value = "单据id")
    private String formId;

    @ApiModelProperty(value = "操作类型:1-详情 ")
    private Integer actionType;

    @DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
    @JsonFormat(pattern = DateUtil.PATTERN_DATETIME, timezone = "Asia/Shanghai")
    @ApiModelProperty(value = "操作时间")
    private Date actionTime;

    @TableLogic
    @ApiModelProperty(value = "状态[0:未删除,1:删除]")
    private Integer isDeleted;

    @ApiModelProperty(value = "方法名")
    private String methodName;

}
